QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Subdivision Style Data Structure

You use a subdivision style data structure to get or set information about the type of subdivision of curves and surfaces used by a renderer. A subdivision style data structure is defined by the TQ3SubdivisionStyleData data type.

typedef struct TQ3SubdivisionStyleData {
    TQ3SubdivisionMethod                method;
    float                               c1;
    float                               c2;
} TQ3SubdivisionStyleData;
method
The method of curve and surface subdivision used by the renderer. This field must contain one of these constants:
                    kQ3SubdivisionMethodConstant
                    kQ3SubdivisionMethodWorldSpace
                    kQ3SubdivisionMethodScreenSpace
The constant kQ3SubdivisionMethodConstant indicates that the renderer subdivides a curve into a number (specified in the c1 field) of polyline segments and a surface into a mesh (whose dimensions are specified by the c1 and c2 fields) of polygons. The constant kQ3SubdivisionMethodWorldSpace indicates that the renderer subdivides a curve (or surface) into polylines (or polygons) whose sides have a world-space length that is at most as large as the value specified in the c1 field. The constant kQ3SubdivisionMethodScreenSpace indicates that the renderer subdivides a curve (or surface) into polylines (or polygons) whose sides have a length that is at most as large as the number of pixels specified in the c1 field.
c1
For constant subdivision, the number of polylines into which a curve should be subdivided, or the number of vertices in the u parametric direction of the polygonal mesh into which a surface is subdivided. For world-space subdivision, the maximum length of a polyline segment (or polygon side) into which a curve (or surface) is subdivided. For screen-space subdivision, the maximum number of pixels in a polyline segment (or polygon side) into which a curve (or surface) is subdivided; for a NURB curve or surface, however, c1 specifies the maximum allowable distance between the curve or surface and the polylines or polygons into which it is subdivided. The value in this field should be an integer greater than 0 for constant subdivision, and greater than 0.0 for world-space or screen-space subdivision.
c2
For constant subdivision, the number of vertices in the v parametric direction of the polygonal mesh into which a surface is subdivided. The value in this field should be an integer greater than 0. For world-space and screen-space subdivision, this field is unused.

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |